package com.wei.miaosha.controller;

import com.wei.miaosha.util.LogUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wei.miaosha.domain.MiaoshaUser;
import com.wei.miaosha.redis.RedisService;
import com.wei.miaosha.result.Result;
import com.wei.miaosha.service.MiaoshaUserService;

/**
 * Created by Weizichen on 2018/8/2.
 * desc:控制层用户信息
 */
@Controller
@RequestMapping("/user")
public class UserController {
    private static Logger logger = LogManager.getLogger("UserController");
    @Autowired
    MiaoshaUserService userService;

    @Autowired
    RedisService redisService;

    @RequestMapping("/info")
    @ResponseBody
    public Result<MiaoshaUser> info(Model model, MiaoshaUser user) {
        LogUtils.infoLog(logger, " " + "-" + " " + "-" + " " + "success" + " " + "用户信息");
        return Result.success(user);
    }

}
